package cn.bluech.lib.utils;

import io.reactivex.Observable;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * Description:
 * Created by Codeant on 2019/5/29.
 */
public class RxUtils {
    public static <T> Observable<T> create(ObservableOnSubscribe<T> source){
        return Observable.create(source)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }
}
